package com.zking.service.jch;

import com.zking.entity.Specification;
import com.zking.mapper.SpecificationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpecificationService {
    @Autowired
    private SpecificationMapper specificationMapper;

    public List<Specification> queryAllSpecifications() {
        return specificationMapper.queryAllSpecifications();
    }

    public boolean addSpecification(String specName) {
      return  specificationMapper.addSpecification(specName) > 0;
    }

    public boolean delSpecification(int id) {
        return  specificationMapper.delSpecification(id) > 0;
    }

    public Specification querySpecification(int id) {
        return specificationMapper.querySpecification(id);
    }

    public boolean updateSpecification(int id, String specName2) {
        return specificationMapper.updateSpecification(id,specName2) > 0;
    }
}
